import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/pages/home/Home'
import City from '@/pages/city/City'
import XinFang from '@/pages/xinfang/XinFang'
import Secondary from '@/pages/secondary/Secondary'
import Strict from '@/pages/strict/Strict'
import Leaderboard from '@/pages/leaderboard/Leaderboard'
import BaiKe from '@/pages/baike/BaiKe'
import Raiders from '@/pages/raiders/Raiders'
import Lines from '@/pages/lines/Lines'
import StrictDetails from '@/pages/strictdetails/StrictDetails'
import HeadlineDetails from '@/pages/headlinedetails/HeadlineDetails'
import XinWenXiangQing from '@/common/xinwenxiangqing/XinWenXiangQing'


Vue.use(Router)

export default new Router({
  // 路由配置
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home
    }, {
      path: '/city',
      name: 'City',
      component: City
    }, {
      path: '/xinfang/',
      name: 'XinFang',
      component: XinFang
    }, {
      path: '/secondary/',
      name: 'Secondary',
      component: Secondary
    }, {
      path: '/strict/',
      name: 'Strict',
      component: Strict
    }, {
      path: '/leaderboard/',
      name: 'Leaderboard',
      component: Leaderboard
    }, {
      path: '/baike/',
      name: 'BaiKe',
      component: BaiKe
    }, {
      path: '/raiders/',
      name: 'Raiders',
      component: Raiders
    }, {
      path: '/lines/',
      name: 'Lines',
      component: Lines
    }, {
      path: '/strictdetails/:id',
      name: 'StrictDetails',
      component: StrictDetails
    }, {
      path: '/headlinedetails/:id',
      name: 'HeadlineDetails',
      component: HeadlineDetails
    }, {
      path: '/xinwenxiangqing/:id',
      name: 'XinWenXiangQing',
      component: XinWenXiangQing
    }
  ],
  scrollBehavior (to, from, savedPosition) {
    return {x: 0, y: 0}
  }
})
